package extends01;

public class Demo {
    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        // teacher.name = "老王"; 报错

        teacher.setName("老王");
        teacher.teach(); // 老王教Java
    }
}
